# 定义函数
def wordCount(word):
    count = 0
    for i in word:
        count += 1
    print(f"字符串{word}的长度为{count}")


wordCount("shenyuyu")


def sum(a, b):
    print(f"两个数的和为：%s" % (a + b))


x = sum(1, 2)
print(x)
print(type(x))

"""这里是注释
没错，的确是注释"""


list = ["1", "2", "3"]
print(list[0])
print(list[1])
print(list[2])


print(list[-1])
print(list[-2])
print(list[-3])


list1 = ["1", 2, "3"]
print(list1)

print("元祖部分：")
t = (1, "2", 3)
for i in t:
    print(i)
    print(type(i))


result = t[::2]
print(result)


set = {1, "2", "3", 1, 1}
print(set)

zidian = {"syy":22, "syz":"男"}
print(zidian)